home *** CD-ROM | disk | FTP | other *** search
/ Celestin Apprentice 2 / Apprentice-Release2.iso / Tools / Languages / RLaB 1.15c / README.mac < prev    next >
Encoding:
Text File  |  1994-11-21  |  11.2 KB  |  250 lines  |  [TEXT/ttxt]

  1.                                                 
  2.                                                             11/20/1994
  3.  
  4.  
  5. This is the Macintosh port of RLaB 1.15c program. RLaB is a Matlab-like 
  6. linear algebra package.  The author is 
  7.     
  8.          Ian Searle
  9.          ians@eskimo.com
  10.     
  11. RLaB is an interpreter for the RLaB Programming Language/Environment. 
  12. The RLaB language is useful for matrix or array oriented numerical
  13. analyses. RLaB is especially useful for prototyping and experimenting 
  14. with algorithms. RLaB extensively uses the LAPACK, FFTPACK and RANLIB 
  15. sources available from netlib.att.com and PLPLOT from dino.ph.utexas.edu.
  16.         
  17. MacRLaB is not a full port of RLaB.  Some items will probably never
  18. be fully supported as they are too tied to the Unix operating system.  
  19. Examples are the 'pipe', the 'fork', the 'socket', and many others.  
  20. Other features are handled a little differently in the Mac version.  
  21. Most of the important differences or extensions of the MacRLaB port 
  22. are described below.
  23.  
  24. 1. Please print out and study the RLaB Primer first, the file is in
  25.    ":doc:rlabp.ps". You can print this Postscript file using 'ShowPages'
  26.    or 'Drop•PS' program (simply drag and drop it onto ShowPages or Drop•PS).
  27.   
  28.    The full history command editing capacity is built-in.  To recall 
  29.    previous commands, just press up and down arrow keys.  
  30.    The 'control' key described in the RLaB Primer can be replaced by the 
  31.    'command' key on the Mac keyboard.  Delete-cursor-character (del) is also 
  32.    supported.  The full description of command line editing is in file
  33.    ":help:COMMAND_EDIT", or type "help COMMAND_EDIT" in RLaB.
  34.    If you need other handy keys, I would like to hear about that.  
  35.  
  36. 2. In this version, you can set up your own file search-path(RLAB_SEARCH_PATH), 
  37.    start-up file (RLAB_RC0), etc.. The default settings are stored in the file 
  38.    'RLab-Preference'. 
  39.    
  40.    To change the settings, just use a text editor to change.  You have to
  41.    set the PLPLOT_DIR environmental variable to the path of your RLaB folder.  
  42.    This setting is important because PLPLOT has to know the location of font 
  43.    files 'plstnd5.fnt' and 'plxtnd5.fnt'.  After making the changes, the file 
  44.    'RLab-Preference' has to be placed in the 'System Folder:Preferences' folder.
  45.  
  46.    For example, if your absolute RLaB folder (directory) path is like
  47.    
  48.    HD --- Appl --- RLaB 
  49.    
  50.    then you can put the following environmental variables in 'RLab-Preference':
  51.    
  52.    RLAB_RC0 = "HD:Appl:RLaB:_rlab";
  53.    PLPLOT_DIR = "HD:Appl:RLaB";
  54.    RLAB_HELP_DIR = "HD:Appl:RLaB:help";
  55.    RLAB_LIB_DIR = "HD:Appl:RLaB:rlib";
  56.    RLAB_SEARCH_PATH = "HD:Appl:RLaB:toolbox;HD:Appl:RLaB:examples"; 
  57.  
  58.    You can have several search-paths, just put them together and use ';' as
  59.    delimiter (see above example with 2 search paths).
  60.    Since RLaB uses absolute search path, the maximum length of each path 
  61.    is 31 characters in length, don't place RLaB folder too deep in your hard 
  62.    disk directory tree.  Also, don't drag MacRLaB out of RLaB folder, use alias.
  63.    
  64.    If you feel the font/size in the MacRLaB console is not the best choice, 
  65.    feel free to change it.  The environmental variable RLAB_FONT can be set
  66.    to one of the following numbers (check Mac document for more):
  67.    
  68.                0 SystemFont
  69.                1 AppleFont
  70.                2 NewYork
  71.                3 Geneva
  72.                4 Monaco
  73.                5 Venice
  74.                6 London
  75.                7 Athens
  76.                8 SanFrancisco
  77.                9 Toronto
  78.               11 Cairo
  79.               12 LosAngles
  80.               20 Times
  81.               21 Helvetica
  82.               22 Courier
  83.  
  84.    It is better to use constant width fonts such as Monaco and Courier,
  85.    otherwise the output will not be aligned.
  86.    The font size (RLAB_SIZE) can be set to any number between 1 and 127 point.  
  87.    The popular font sizes for the console are 
  88.                
  89.                9 points
  90.               10 points
  91.               11 points
  92.               12 points
  93.               14 points
  94.               18 points
  95.               
  96.    You can change the number of rows (RLAB_ROWS) on the console also.  
  97.    Default values are   
  98.  
  99.               RLAB_FONT = "4 Monaco";
  100.               RLAB_SIZE = "9 points";
  101.               RLAB_ROWS = "25";
  102.             
  103. 3. This version of RLaB comes with a built-in plotting library PLPLOT.
  104.    PLPLOT is a powerful tool for XY and XYZ graphics.  It can generate
  105.    (via plprint) Postscript, color Postscript, HP LJ, and lots of other 
  106.    formats for post processing. 
  107.  
  108.    I've implemented a minimum Mac interface for PLPLOT4.99i.  Multi-window is 
  109.    allowed but the redrawing is slow; well, that depends on what machine you 
  110.    got.  The number of windows is limited to 10.  
  111.    
  112.    The mac-plplot interface is based on ColorQuickDraw routines.  Sixteen 
  113.    colors are directly available in PLPLOT. These colors are pre-assigned 
  114.    as the following numbers:
  115.    
  116.       1       2         3        4        5         6         7       8
  117.      black   red    yellow      green  aquamarine  pink     wheat   gray
  118.    
  119.       9      10        11       12       13        14        15      16
  120.      brown   blue   blueviolet  cyan   turquoise   magenta  salmon  white 
  121.       
  122.    You can select color by _plcol() function.  More colors are available by
  123.    using RGB combinations (see PLPLOT manual). There are three things remained  
  124.    to be done -- add scroll bar to the MacRLaB window, add copy/paste ability 
  125.    in the graphics windows, and add PICT image to the generated EPSF files.
  126.    
  127.    At this stage, you can include the Postscript output (EPSF) in your document
  128.    (Word, MacDraw, Canvas, TeX, ...) but you can only see a big crossed
  129.    box (the bounding box) on the screen due to the lack of PICT image.
  130.    You can perform scaling, rotating, dragging,... on the box except there
  131.    is no picture inside.  The picture will appear in the printed copy.
  132.    If you need superscript, subscript, over/under line char, and Greek letters 
  133.    in annotation of axis, title, etc., then you need to get a copy of PLPLOT 
  134.    manual.  See README.PLPLOT for detail.  
  135.    There is a plotting example in ":examples:plot_test.r", try
  136.    
  137.    >rfile plot_test
  138.  
  139.    You can click on those background windows to see them again. The graphics 
  140.    windows are numbered as plplot 0, plplot 1, plplot 2, ..., and so on.  You 
  141.    can also resize or drag them.  Resizing on the screen will not affect 
  142.    the quality of later plprint() output. 
  143.    
  144.    For each graph window, there is a temporary file (SCRATCH ????) 
  145.    associated with it.  It contains your plotting commands which can be used
  146.    later to produce a Postscript or other types of graphics file (via
  147.    plprint).  It is also used by my Mac interface in redrawing.  Don't dump
  148.    them to trash during the execution of MacRLaB.   They will be automatically 
  149.    eliminated after the execution.   Also, don't use pend() to close 
  150.    graphics windows unless you don't want to plot anymore. Use pclose() 
  151.    instead.  plplot has a bug that it does not close the plotting command 
  152.    file even you close the graphics window by pend() or pclose().  So if you 
  153.    plot after pend(), the old picture together with the new picture will 
  154.    appear on the graphics window.
  155.    
  156.    If you plot several pages of PS graph into a file, you have to change 
  157.    the file type to 'TEXT' (all capital) by drag and drop the file onto
  158.    ctc 1.5.  After the file type has been changed, you can print it out 
  159.    by Drop•PS or ShowPages.  Why?  Because plplot creates the PS output file
  160.    in binary mode, but Drop•PS and ShowPages accept only TEXT file.
  161.       
  162. 4. By the way, do you know how to change directory (folder) using cd() on the 
  163.    Mac?  Here is how.
  164.    
  165.    Suppose that your hard disk directory tree is like this
  166.    
  167.                             ----- Peggy
  168.                             |                             |-- rlib
  169.          --------- App -----|                             |
  170.          |                  |                             |-- examples
  171.    HD ---|                  ----- RLaB (you are here) ----|
  172.          |                                                |-- help
  173.          -------- Kevin                                   |
  174.                                                           |-- toolbox
  175.          
  176.    When you launch RLaB, you are in RLaB directory.  If you wish to 
  177.    change directory to "examples", you can use either
  178.    
  179.    >cd(":examples");  // relative method ( cannot use cd("examples"); )
  180.    
  181.    or
  182.    
  183.    >cd("HD:App:RLaB:examples");  // absolute method
  184.    
  185.    The colon ":" means present directory, it is similar to "." on the Unix
  186.    but not exactly the same.  You MUST supply a ":" at first if partial 
  187.    (relative) pathname is used.  If the first character of a pathname is not 
  188.    a ":", it is a full (absolute) pathname.  Two colons "::" means parent 
  189.    directory (folder).  Three colons ":::" means grandparent directory.
  190.    
  191.    For example, if your work directory is in Kevin and you are in 
  192.    RLaB now,  you can use either
  193.    
  194.    >cd(":::Kevin");   // relative method
  195.    
  196.    or
  197.    
  198.    >cd("HD:Kevin");   // absolute method
  199.    
  200.    to change directory to Kevin.
  201.    
  202. 5. Your machine must have a MC68020/30/40 and a numerical processor 
  203.    (MC68881 or better) to run RLaB (sorry!).   You don't need a numerical 
  204.    processor on a MC68040 based machine.  MC68LC040 does not come with a
  205.    built-in numerical processor.  You have to install SoftFPU to run 
  206.    MacRLaB if your machine doesn't have a numerical processor.  
  207.    You also need System 7 to run it. RLaB is a 32-bit clean program.  Try
  208.    
  209.    >load("test")
  210.  
  211.    on your machine to see if your machine can pass all tests.  A version
  212.    for PowerMac is in progress.
  213.       
  214. 6. The total size of arrays is only limited by the available memory of your 
  215.    machine.  If RLaB runs out of memory, it will display
  216.        
  217.         RLaB: out of memory. 
  218.         
  219.    on the screen.  You can either increase RLaB memory using 'Get Info' of 
  220.    System 7 Finder or, if your physical RAM is limited, turn on the virtual
  221.    memory and set memory size large enough for your application.     
  222.  
  223. 7. To interrupt RLaB during execution, type command-. (i.e. press command 
  224.    key + period key), it will return to the interactive mode in the next i/o.  
  225.    To abort RLaB and kick it out, you can use File-Quit (command-Q) on Menu bar. 
  226.    You can also do so by type in command-d at the beginning of a command line.
  227.    If RLaB hangs, press command-option-esc to abort it.
  228.  
  229. 8. The source code of mac version is merged in the rlab source code 
  230.    distribution (see :misc:ftp-sites).  Those statements within 
  231.                #ifdef THINK_C  ... #endif 
  232.    are my modifications for THINK C compiler on the Mac.  I've modified the 
  233.    console user interface.  Three difference files diff1, diff2, and diff3 
  234.    tell you those modifications.  You also need f2c and POSIX libraries. 
  235.    They are available in info-mac archives.
  236.    
  237. 9. If you wish to join the RLaB community, send an email to Ian and ask him 
  238.    to add your name in the mailing list.  You can reach the RLaB community by
  239.    sending email to rlab-list@eskimo.com .
  240.    
  241. 10. We need more toolboxes.  Please send your useful .r files to Ian.  Thanks.
  242.  
  243. 11. THIS IS FREE SOFTWARE. THERE IS NO WARRANTY FOR THE PROGRAM.  USE IT AT 
  244.     YOUR OWN RISK.  
  245.  
  246. Have fun!
  247.  
  248. Tzong-Shuoh Yang   
  249. (tsyang@ce.berkeley.edu) 
  250.